package tech.aistar.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tech.aistar.pojo.Comment;

import java.util.List;
@Repository
public interface CommentMapper {
    @Select("select *from comment")
    List<Comment> findAll();
    @Insert("insert into comment(id,from_uid,from_name,content,create_time,u_photo)" +
            "        values (#{id},#{fromUid},#{fromName},#{content},#{createTime},#{uPhoto})")
    int insert(Comment comment);
}
